package com.ymttest.database.mapping.godmch;

import com.ymttest.database.model.godmch.mch_depot_info;
import com.ymttest.database.model.godmch.mch_depot_infoExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface mch_depot_infoMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_depot_info
     *
     * @mbggenerated Thu May 07 11:43:51 CST 2020
     */
    @SelectProvider(type=mch_depot_infoSqlProvider.class, method="countByExample")
    int countByExample(mch_depot_infoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_depot_info
     *
     * @mbggenerated Thu May 07 11:43:51 CST 2020
     */
    @DeleteProvider(type=mch_depot_infoSqlProvider.class, method="deleteByExample")
    int deleteByExample(mch_depot_infoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_depot_info
     *
     * @mbggenerated Thu May 07 11:43:51 CST 2020
     */
    @Delete({
        "delete from mch_depot_info",
        "where depotId = #{depotId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer depotId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_depot_info
     *
     * @mbggenerated Thu May 07 11:43:51 CST 2020
     */
    @Insert({
        "insert into mch_depot_info (depotId, depotTitle, ",
        "mchId, remark, depotStatus, ",
        "createTime, updateTime)",
        "values (#{depotId,jdbcType=INTEGER}, #{depotTitle,jdbcType=VARCHAR}, ",
        "#{mchId,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{buyerTitle,jdbcType=VARCHAR}, #{picUrl,jdbcType=VARCHAR}, #{depotStatus,jdbcType=INTEGER}, ",
        "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(mch_depot_info record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_depot_info
     *
     * @mbggenerated Thu May 07 11:43:51 CST 2020
     */
    @InsertProvider(type=mch_depot_infoSqlProvider.class, method="insertSelective")
    int insertSelective(mch_depot_info record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_depot_info
     *
     * @mbggenerated Thu May 07 11:43:51 CST 2020
     */
    @SelectProvider(type=mch_depot_infoSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="depotId", property="depotId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="depotTitle", property="depotTitle", jdbcType=JdbcType.VARCHAR),
        @Result(column="mchId", property="mchId", jdbcType=JdbcType.INTEGER),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="buyerTitle", property="buyerTitle", jdbcType=JdbcType.VARCHAR),
        @Result(column="picUrl", property="picUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="depotStatus", property="depotStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="createTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<mch_depot_info> selectByExample(mch_depot_infoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_depot_info
     *
     * @mbggenerated Thu May 07 11:43:51 CST 2020
     */
    @Select({
        "select",
        "depotId, depotTitle, mchId, remark, depotStatus, createTime, updateTime",
        "from mch_depot_info",
        "where depotId = #{depotId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="depotId", property="depotId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="depotTitle", property="depotTitle", jdbcType=JdbcType.VARCHAR),
        @Result(column="mchId", property="mchId", jdbcType=JdbcType.INTEGER),
        @Result(column="remark", property="remark", jdbcType=JdbcType.VARCHAR),
        @Result(column="buyerTitle", property="buyerTitle", jdbcType=JdbcType.VARCHAR),
        @Result(column="picUrl", property="picUrl", jdbcType=JdbcType.VARCHAR),
        @Result(column="depotStatus", property="depotStatus", jdbcType=JdbcType.INTEGER),
        @Result(column="createTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="updateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    mch_depot_info selectByPrimaryKey(Integer depotId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_depot_info
     *
     * @mbggenerated Thu May 07 11:43:51 CST 2020
     */
    @UpdateProvider(type=mch_depot_infoSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") mch_depot_info record, @Param("example") mch_depot_infoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_depot_info
     *
     * @mbggenerated Thu May 07 11:43:51 CST 2020
     */
    @UpdateProvider(type=mch_depot_infoSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") mch_depot_info record, @Param("example") mch_depot_infoExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_depot_info
     *
     * @mbggenerated Thu May 07 11:43:51 CST 2020
     */
    @UpdateProvider(type=mch_depot_infoSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(mch_depot_info record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table mch_depot_info
     *
     * @mbggenerated Thu May 07 11:43:51 CST 2020
     */
    @Update({
        "update mch_depot_info",
        "set depotTitle = #{depotTitle,jdbcType=VARCHAR},",
          "mchId = #{mchId,jdbcType=INTEGER},",
          "remark = #{remark,jdbcType=VARCHAR},",
          "buyerTitle = #{buyerTitle,jdbcType=VARCHAR},",
          "picUrl = #{picUrl,jdbcType=VARCHAR},",
          "depotStatus = #{depotStatus,jdbcType=INTEGER},",
          "createTime = #{createTime,jdbcType=TIMESTAMP},",
          "updateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where depotId = #{depotId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(mch_depot_info record);
}